package phone.qyg.com.qyg.activity;

import android.os.Bundle;
import android.view.View;

import com.app.base.tool.BaseActivity;
import com.app.utils.OptionImageUtils;
import com.bm.library.PhotoView;
import com.nostra13.universalimageloader.core.ImageLoader;

import org.xutils.view.annotation.ContentView;
import org.xutils.view.annotation.Event;
import org.xutils.view.annotation.ViewInject;

import phone.qyg.com.qyg.R;


/**
 * 作者：lblbh on 2017/9/26 14:54
 * 邮箱：lanbuhan@163.com
 * 功能：webView图片查看
 */
@ContentView(R.layout.show_web_img)
public class ShowWebImageActivity extends BaseActivity {

    @ViewInject(R.id.show_webimage_imageview)
    PhotoView show_webimage_imageview;

    String imageUrl;

    @Override
    public void initSucessView() {
        imageUrl = getIntent().getStringExtra("image");
    }

    @Override
    public void initData(Bundle savedInstanceState) {
        // 启用图片缩放功能
        show_webimage_imageview.enable();
        ImageLoader.getInstance().displayImage(imageUrl,show_webimage_imageview, OptionImageUtils.getDelfaultOption());
    }


    @Event(value = {R.id.show_webimage_imageview})
    private void viewOnClick(View v){
        switch (v.getId()){
            case R.id.show_webimage_imageview:
                this.finish();
                break;
        }
    }
    @Override
    public void initViewHandler() {}
}
